<script type="text/javascript">
function backtolist() {
	window.location = '<?=base_url()?>admin/store/customer';
}
function importcustomer() {
	if($j('#userfile').val() == '')
	{
		alert('Please select file to import');
		return false;
	}
	document.importcustomerForm.submit();
}
</script> 	
        <div class="left">
        	<h1>Store Management</h1>
            <div class="bar">

            	<div class="text">Import New Customers</div>
            	<div class="cr"></div>
            </div>
            <div class="box">
            	<input type="button" class="button rounded" value="Back to Customers List" onClick="backtolist()" />
                <?php if($this->session->flashdata('error_upload'))
			   {
				    echo '<div style="color:#ff0000">'.$this->session->flashdata('error_upload').'</div>';
			   }
			   ?>
            </div>
            <hr />
            
            <form method="post" action="<?=base_url()?>admin/store/import_trader" name="importcustomerForm" enctype="multipart/form-data">
          
            <div class="box bgw">
            	<h3>Input FIle</h3>
                <dl class="three"><dt>CSV file</dt><dd><input type="file" name="userfile" id="userfile" /></dd></dl>
               
                <dl></dl>
            </div>
            <hr />
            
           
            <div class="box">
                <!--
            	<dl class="three"><dt>&nbsp;</dt>
            		<dd><label><input type="checkbox" id="notify" /> &nbsp; Send approval notification email to this user</label></dd>
            	</dl><dl></dl><br />
                -->
                <dl class="three">
                	<!--<dd><input type="submit" class="button rounded" value="Update" /></dd>
                	<dd><input type="button" class="button rounded" value="Approve" onClick="approved()" /></dd>
                	<dd><input type="button" class="button rounded" value="Pending" onClick="pending()" /></dd>-->
                	<dt><input type="button" class="button rounded" value="Import" onClick="javascript:importcustomer()" /></dt>
                	                    
                </dl>
                <dl></dl>
            </div>
            </form>
            
        </div>
        
